<%@ page import="com.auctionhaus.Customer; com.auctionhaus.RoleName" %>
<div class="nav">
    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
    <span class="menuButton"><g:link controller="listing" class="list" action="list"><g:message code="default.list.label" args="['Listing']" /></g:link></span>

    <!-- User must be logged in to view these-->
    <g:if test="${session?.customer}">
        <span class="menuButton"><g:link controller="listing" class="create" action="create"><g:message code="default.new.label" args="['Listing']" /></g:link></span>
        <span class="menuButton"><a class="myListings" href="${createLink(uri: '/customer/myListings')}"><g:message code="My Listings"/></a></span>
    </g:if>
    <g:else>
        <!-- Allow a new ser to register-->
        <span class="menuButton"><a class="register" href="${createLink(uri: '/customer/create')}"><g:message code="Register"/></a></span>
    </g:else>

    <g:if test="${session?.customer?.isAdminRole()}">
        <span class="menuButton"><g:link controller="customer" class="list" action="list"><g:message code="default.list.label" args="['Customer']" /></g:link>

        <%-- place admin stuff here--%>
        <span class="menuButton"><g:link controller="customer" class="list" action="list"><g:message code="default.list.label" args="['Customer']" /></g:link></span>
        <span class="menuButton"><g:link controller="customer" class="create" action="create"><g:message code="default.new.label" args="['Customer']" /></g:link></span>
        <span class="menuButton"><g:link controller="bid" class="list" action="list"><g:message code="default.list.label" args="['Bid']" /></g:link></span>
        <span class="menuButton"><g:link controller="bid" class="create" action="create"><g:message code="default.new.label" args="['Bid']" /></g:link></span>
    </g:if>
</div>
